package com.deep.order.feign;

import com.deep.order.model.vo.MemberAddressVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Deep
 * @date 2022/2/14
 */
@FeignClient("mall-member")
public interface MemberFeignService {
    /**
     * 根据会员id查询会员的所有收货地址
     */
    @GetMapping(value = "/member/memberreceiveaddress/{memberId}/address")
    List<MemberAddressVO> getAddress(@PathVariable("memberId") Long memberId);

    /**
     * 根据addrId获取指定收货地址
     */
    @GetMapping(value = "/member/memberreceiveaddress/fare")
    MemberAddressVO getAddressById(@RequestParam("addrId") Long addrId);
}
